

public class CognitiveRadio extends Agent {

	public static double PROBABILITY_FOR_TRANSMISSION = 0.2;
	public static double EPSILON = 0.2;
	public double rewardForCurrentIteration;
	public Method decisionMethod;
	
	public CognitiveRadio(String aName, Environment anEnvironment, Role aRole,
			Method aMethod) {
		super(aName, anEnvironment, aRole);
		rewardForCurrentIteration = 0;
		decisionMethod = aMethod;
	}
	
	public void explore() {
		
	}
	
	public void exploit() {
		
	}
	
	public void iterate() {

	}
	
	public void transmit() {
		decideParameters();
		occupySpectrum(nextState.occupiedSpectrum);
		adjustPower(nextState.transmissionPower);
		calculateReward();
		previousState = currentState;
		vacateSpectrum();
		turnOffPower();
	}
	
	public void decideParameters() {

	}
	
	public void calculateReward() {
		if (currentState.occupiedSpectrum.containsPrimaryUser) {
			rewardForCurrentIteration = -5.0;
		} else {
			rewardForCurrentIteration = 5.0;
		}
	}
	
}
